package me.zhengjie.modules.website.domain;

import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
import me.zhengjie.base.BaseEntity;

import javax.persistence.*;

/**
 * 专题栏目实体类
 *
 * 此类表示网站的专题栏目，包含栏目标题、封面图片、描述、状态和排序顺序等字段。
 * 继承了 BaseEntity，包含通用的实体属性。
 *
 * @author system
 * @since 2024-12-02 17:12:28
 */
@Entity
@Data
@Table(name = "ws_topics")
@ApiModel(value = "Topics", description = "专题栏目")
public class Topics extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 专题栏目ID
     */
    @Id
    @Column(name = "topic_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "专题栏目ID", example = "1")
    private Long id;

    /**
     * 栏目标题
     */
    @Column(name = "title")
    @ApiModelProperty(value = "栏目标题", example = "教育专题")
    private String title;

    /**
     * 封面图片
     */
    @Column(name = "cover_image")
    @ApiModelProperty(value = "封面图片URL", example = "http://example.com/image.jpg")
    private String coverImage;

    /**
     * 封面图片
     */
    @Column(name = "second_image")
    @ApiModelProperty(value = "封面图片2", example = "http://example.com/image.jpg")
    private String SecondImage;


    /**
     * 栏目描述
     */
    @Column(name = "description")
    @ApiModelProperty(value = "栏目描述", example = "本专题主要讨论教育相关内容")
    private String description;

    /**
     * 状态（0-禁用，1-启用）
     */
    @Column(name = "status")
    @NotNull(message = "状态不能为空")
    @ApiModelProperty(value = "状态", allowableValues = "0, 1", example = "1")
    private Integer status;

    /**
     * 排序顺序
     */
    @Column(name = "sort_order")
    @ApiModelProperty(value = "排序顺序", example = "5")
    private Integer sortOrder;
}